package com.fengycx.autoconfigure;

import com.fengycx.properties.DriverAppRegisterProp;
import com.fengycx.template.WechatTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@EnableConfigurationProperties({DriverAppRegisterProp.class})//这里把DriverAppRegisterProp交给spring下面有参直接用
public class WechatAutoConfiguration {

    @Bean
    public WechatTemplate wechatTemplates(DriverAppRegisterProp driverAppRegisterProp){
        return new WechatTemplate(driverAppRegisterProp);
    }



}
